// 系统资源配置，同时作为 demo 路由和菜单的数据源
// component 为空的表示虚拟菜单，不会处理为 routers
// component 默认会补充 pages 做为根目录，配置时从 pages 内目录开始配置
// menuItemId 必须唯一，同时会作为 routers 的 name
// closable 一般配置在跟菜单，默认展开还是收缩
// uri 可以不配置上级 url，因为 router 中是按照嵌套路由方式处理的，vue 前端 url

import adminResources from "../admin/resources";

const resources = Array<any>();

adminResources.forEach((item) => {
  resources.push(item);
});

const demoResources = [
  {
    menuItemId: "1",
    parentMenuItemId: "0",
    menuItemName: "基础知识",
    resourceId: "",
    uri: "",
    component: "",
    icon: "Grid",
    closable: true,
  },
  {
    menuItemId: "11",
    parentMenuItemId: "1",
    menuItemName: "props",
    resourceId: "",
    uri: "props",
    component: "demo/demo-props/index.vue",
    icon: "",
    closable: true,
  },
  {
    menuItemId: "13",
    parentMenuItemId: "1",
    menuItemName: "emits",
    resourceId: "",
    uri: "emits",
    component: "demo/demo-emits/index.vue",
    icon: "",
    closable: true,
  },
  {
    menuItemId: "15",
    parentMenuItemId: "1",
    menuItemName: "watch",
    menuItemClass: "",
    resourceId: "",
    uri: "/demo/watch",
    component: "demo/demo-watch/index.vue",
    icon: "",
    closable: true,
  },
  {
    menuItemId: "17",
    parentMenuItemId: "1",
    menuItemName: "expose",
    menuItemClass: "",
    resourceId: "",
    uri: "/demo/expose",
    component: "demo/demo-expose/index.vue",
    closable: true,
  },
  {
    menuItemId: "19",
    parentMenuItemId: "1",
    menuItemName: "store",
    menuItemClass: "",
    resourceId: "",
    uri: "/demo/store",
    component: "/demo/demo-store/index.vue",
    icon: "",
    closable: true,
  },
  {
    menuItemId: "111",
    parentMenuItemId: "1",
    menuItemName: "env",
    menuItemClass: "",
    resourceId: "",
    uri: "/demo/env",
    component: "demo/demo-env/index.vue",
    icon: "",
    closable: true,
  },
  {
    menuItemId: "113",
    parentMenuItemId: "1",
    menuItemName: "svg、icon",
    menuItemClass: "",
    resourceId: "",
    uri: "/demo/svg",
    component: "demo/demo-svg/index.vue",
    icon: "",
    closable: true,
  },
  {
    menuItemId: "115",
    parentMenuItemId: "1",
    menuItemName: "axios、mock",
    menuItemClass: "",
    resourceId: "",
    uri: "/demo/axios",
    component: "demo/demo-axios/index.vue",
    icon: "",
    closable: true,
  },

  {
    menuItemId: "2",
    parentMenuItemId: "0",
    menuItemName: "扩展知识",
    menuItemClass: "",
    resourceId: "",
    uri: "",
    component: "",
    icon: "CoffeeCup",
    closable: true,
  },
  {
    menuItemId: "21",
    parentMenuItemId: "2",
    menuItemName: "slot",
    menuItemClass: "",
    resourceId: "",
    uri: "/demo/slot",
    component: "demo/demo-slot/index.vue",
    icon: "",
    closable: true,
  },
  {
    menuItemId: "23",
    parentMenuItemId: "2",
    menuItemName: "router",
    menuItemClass: "",
    resourceId: "",
    uri: "/demo/router",
    component: "demo/demo-router/layout/index.vue",
    icon: "",
    closable: true,
  },

  {
    menuItemId: "3",
    parentMenuItemId: "0",
    menuItemName: "Element Plus",
    menuItemClass: "",
    resourceId: "",
    uri: "",
    component: "",
    icon: "Folder",
    closable: true,
  },
  {
    menuItemId: "31",
    parentMenuItemId: "3",
    menuItemName: "el table",
    menuItemClass: "",
    resourceId: "",
    uri: "/demo/table",
    component: "demo/demo-element-table/index.vue",
    icon: "",
    closable: true,
  },
  {
    menuItemId: "32",
    parentMenuItemId: "3",
    menuItemName: "el data grid",
    menuItemClass: "",
    resourceId: "",
    uri: "/demo/datagrid",
    component: "demo/demo-datagrid/index.vue",
    icon: "",
    closable: true,
  },
];

demoResources.forEach((item) => {
  resources.push(item);
});

export default resources;
